home *** CD-ROM | disk | FTP | other *** search
/ Programming Microsoft Visual Basic .NET / Programming Microsoft Visual Basic .NET (Microsoft Press)(X08-78517)(2002).bin / setup / vbnet / 16 windows forms / subclassingdemo / startupform.vb < prev    next >
Encoding:
Text File  |  2001-09-18  |  3.3 KB  |  94 lines

  1. Public Class StartupForm
  2.     Inherits System.Windows.Forms.Form
  3.  
  4. #Region " Windows Form Designer generated code "
  5.  
  6.     Public Sub New()
  7.         MyBase.New()
  8.  
  9.         'This call is required by the Windows Form Designer.
  10.         InitializeComponent()
  11.  
  12.         'Add any initialization after the InitializeComponent() call
  13.  
  14.     End Sub
  15.  
  16.     'Form overrides dispose to clean up the component list.
  17.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  18.         If disposing Then
  19.             If Not (components Is Nothing) Then
  20.                 components.Dispose()
  21.             End If
  22.         End If
  23.         MyBase.Dispose(disposing)
  24.     End Sub
  25.     Friend WithEvents Button1 As System.Windows.Forms.Button
  26.     Friend WithEvents Button2 As System.Windows.Forms.Button
  27.     Friend WithEvents Button3 As System.Windows.Forms.Button
  28.  
  29.     'Required by the Windows Form Designer
  30.     Private components As System.ComponentModel.Container
  31.  
  32.     'NOTE: The following procedure is required by the Windows Form Designer
  33.     'It can be modified using the Windows Form Designer.  
  34.     'Do not modify it using the code editor.
  35.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  36.         Me.Button1 = New System.Windows.Forms.Button()
  37.         Me.Button2 = New System.Windows.Forms.Button()
  38.         Me.Button3 = New System.Windows.Forms.Button()
  39.         Me.SuspendLayout()
  40.         '
  41.         'Button1
  42.         '
  43.         Me.Button1.Location = New System.Drawing.Point(32, 24)
  44.         Me.Button1.Name = "Button1"
  45.         Me.Button1.Size = New System.Drawing.Size(160, 32)
  46.         Me.Button1.TabIndex = 0
  47.         Me.Button1.Text = "Subclassing"
  48.         '
  49.         'Button2
  50.         '
  51.         Me.Button2.Location = New System.Drawing.Point(32, 80)
  52.         Me.Button2.Name = "Button2"
  53.         Me.Button2.Size = New System.Drawing.Size(160, 32)
  54.         Me.Button2.TabIndex = 0
  55.         Me.Button2.Text = "TransparencyKey"
  56.         '
  57.         'Button3
  58.         '
  59.         Me.Button3.Location = New System.Drawing.Point(32, 136)
  60.         Me.Button3.Name = "Button3"
  61.         Me.Button3.Size = New System.Drawing.Size(160, 32)
  62.         Me.Button3.TabIndex = 0
  63.         Me.Button3.Text = "Opacity"
  64.         '
  65.         'StartupForm
  66.         '
  67.         Me.AutoScaleBaseSize = New System.Drawing.Size(7, 17)
  68.         Me.ClientSize = New System.Drawing.Size(232, 205)
  69.         Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Button2, Me.Button1})
  70.         Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 11!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  71.         Me.Name = "StartupForm"
  72.         Me.Text = "StartupForm"
  73.         Me.ResumeLayout(False)
  74.  
  75.     End Sub
  76.  
  77. #End Region
  78.  
  79.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  80.         Dim frm As New SubclassingForm()
  81.         frm.Show()
  82.     End Sub
  83.  
  84.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  85.         Dim frm As New TransparentForm()
  86.         frm.Show()
  87.     End Sub
  88.  
  89.     Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
  90.         Dim frm As New OpacityForm()
  91.         frm.Show()
  92.     End Sub
  93. End Class
  94.